const _import = require('@/utils/view-import/' + process.env.NODE_ENV)

const formRoutes = [
  {
    path: 'formList',
    name: '自定义表单列表',
    component: _import('form/formList')
  },
  {
    path: 'itemList',
    name: '自定义表单项列表',
    component: _import('form/itemList')
  },
  {
    path: 'timeline',
    name: '时间轴',
    component: _import('form/timeline')
  }
]

const systemRoute = [
  {
    path: 'role',
    name: '角色管理',
    component: _import('sys/role')
  },
  {
    path: 'log',
    name: '系统日志',
    component: _import('sys/log')
  },
  {
    path: 'permission',
    name: '权限管理',
    component: _import('sys/permission')
  },
  {
    path: 'user',
    name: '用户管理',
    component: _import('sys/user')
  },
  {
    path: 'org',
    name: '单位管理',
    component: _import('sys/org')
  }
]

export default [
  {
    path: '/clue',
    component: _import('clue/layout'),
    redirect: '/clue/management',
    children: [
      ...systemRoute,
      ...formRoutes,
      {
        path: 'index',
        name: '欢迎页',
        component: _import('index')
      },
      {
        path: 'management',
        name: '线索管理',
        component: _import('clue/management')
      },
      {
        path: 'Investigation',
        name: '线索侦办',
        component: _import('clue/Investigation')
      }
    ]
  }
]
